<?php
	
class Table_Defile extends Zend_Db_Table_Abstract
{
    protected $_name    = 'defile';
    protected $_primary = 'DEFILE_NUMERO';
    protected $_sequence = TRUE;
 	
	public function insertDefile($numVip, $lieu, $date){
		$data = array('VIP_NUMERO'=> $numVip, 'DEFILE_LIEU' => $lieu, 'DEFILE_DATE' => $date);
		$this->insert($data);
	}
	
	public function getDefile($idDefie){
		return $this->fetchRow($this
			->select()
			->where('DEFILE_NUMERO= ?', $idDefie));	
	}
	
	public function getDefileId($idVip){
		return $this->fetchAll($this
			->select()
			->where('VIP_NUMERO= ?', $idVip));	
	}
	
	public function supprDefile($id){
		$this->delete('VIP_NUMERO ='.(int)$id);
	}
	
	
}